Optimal. Leaf size=244 \[ -\frac {(-1)^{3/4} a^{3/2} (12 A-11 i B) \text {ArcTan}\left (\frac {(-1)^{3/4} \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{4 d}-\frac {(2+2 i) a^{3/2} (A-i B) \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{d}+\frac {i a B \sqrt {a+i a \tan (c+d x)}}{2 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {a (4 i A+5 B) \sqrt {a+i a \tan (c+d x)}}{4 d \sqrt {\cot (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.56, antiderivative size = 244, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 10, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {4326, 3675,
3678, 3682, 3625, 211, 3680, 65, 223, 209} \begin {gather*} -\frac {(-1)^{3/4} a^{3/2} (12 A-11 i B) \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \text {ArcTan}\left (\frac {(-1)^{3/4} \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{4 d}-\frac {(2+2 i) a^{3/2} (A-i B) \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}+\frac {a (5 B+4 i A) \sqrt {a+i a \tan (c+d x)}}{4 d \sqrt {\cot (c+d x)}}+\frac {i a B \sqrt {a+i a \tan (c+d x)}}{2 d \cot ^{\frac {3}{2}}(c+d x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 209
Rule 211
Rule 223
Rule 3625
Rule 3675
Rule 3678
Rule 3680
Rule 3682
Rule 4326
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (c+d x))^{3/2} (A+B \tan (c+d x))}{\sqrt {\cot (c+d x)}} \, dx &=\left (\sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^{3/2} (A+B \tan (c+d x)) \, dx\\ &=\frac {i a B \sqrt {a+i a \tan (c+d x)}}{2 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {1}{2} \left (\sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)} \left (\frac {1}{2} a (4 A-3 i B)+\frac {1}{2} a (4 i A+5 B) \tan (c+d x)\right ) \, dx\\ &=\frac {i a B \sqrt {a+i a \tan (c+d x)}}{2 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {a (4 i A+5 B) \sqrt {a+i a \tan (c+d x)}}{4 d \sqrt {\cot (c+d x)}}+\frac {\left (\sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {\sqrt {a+i a \tan (c+d x)} \left (-\frac {1}{4} a^2 (4 i A+5 B)+\frac {1}{4} a^2 (12 A-11 i B) \tan (c+d x)\right )}{\sqrt {\tan (c+d x)}} \, dx}{2 a}\\ &=\frac {i a B \sqrt {a+i a \tan (c+d x)}}{2 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {a (4 i A+5 B) \sqrt {a+i a \tan (c+d x)}}{4 d \sqrt {\cot (c+d x)}}-\left (2 a (i A+B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {\tan (c+d x)}} \, dx+\frac {1}{8} \left ((12 i A+11 B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {(a-i a \tan (c+d x)) \sqrt {a+i a \tan (c+d x)}}{\sqrt {\tan (c+d x)}} \, dx\\ &=\frac {i a B \sqrt {a+i a \tan (c+d x)}}{2 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {a (4 i A+5 B) \sqrt {a+i a \tan (c+d x)}}{4 d \sqrt {\cot (c+d x)}}+\frac {\left (4 i a^3 (i A+B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{-i a-2 a^2 x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}+\frac {\left (a^2 (12 i A+11 B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {x} \sqrt {a+i a x}} \, dx,x,\tan (c+d x)\right )}{8 d}\\ &=-\frac {(2-2 i) a^{3/2} (i A+B) \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{d}+\frac {i a B \sqrt {a+i a \tan (c+d x)}}{2 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {a (4 i A+5 B) \sqrt {a+i a \tan (c+d x)}}{4 d \sqrt {\cot (c+d x)}}+\frac {\left (a^2 (12 i A+11 B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a+i a x^2}} \, dx,x,\sqrt {\tan (c+d x)}\right )}{4 d}\\ &=-\frac {(2-2 i) a^{3/2} (i A+B) \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{d}+\frac {i a B \sqrt {a+i a \tan (c+d x)}}{2 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {a (4 i A+5 B) \sqrt {a+i a \tan (c+d x)}}{4 d \sqrt {\cot (c+d x)}}+\frac {\left (a^2 (12 i A+11 B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{1-i a x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{4 d}\\ &=-\frac {\sqrt [4]{-1} a^{3/2} (12 i A+11 B) \tan ^{-1}\left (\frac {(-1)^{3/4} \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{4 d}-\frac {(2-2 i) a^{3/2} (i A+B) \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{d}+\frac {i a B \sqrt {a+i a \tan (c+d x)}}{2 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {a (4 i A+5 B) \sqrt {a+i a \tan (c+d x)}}{4 d \sqrt {\cot (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 4.02, size = 441, normalized size = 1.81 \begin {gather*} \frac {\cos ^2(c+d x) \sqrt {\cot (c+d x)} (\cos (d x)-i \sin (d x)) (a+i a \tan (c+d x))^{3/2} (A+B \tan (c+d x)) \left (-\sqrt {2} \left (\sqrt {2} (12 A-11 i B) \log \left (\frac {2 e^{\frac {5 i c}{2}} \left (\sqrt {2}-i \sqrt {2} e^{i (c+d x)}+2 i \sqrt {-1+e^{2 i (c+d x)}}\right )}{(12 A-11 i B) \left (-i+e^{i (c+d x)}\right )}\right )+\sqrt {2} (-12 A+11 i B) \log \left (\frac {2 e^{\frac {5 i c}{2}} \left (-i \sqrt {2}+\sqrt {2} e^{i (c+d x)}+2 \sqrt {-1+e^{2 i (c+d x)}}\right )}{(12 i A+11 B) \left (i+e^{i (c+d x)}\right )}\right )+32 (A-i B) \log \left ((\cos (c)-i \sin (c)) \left (\cos (c+d x)+i \sin (c+d x)+\sqrt {-1+\cos (2 (c+d x))+i \sin (2 (c+d x))}\right )\right )\right ) \sqrt {i (i+\cot (c+d x)) \sin ^2(c+d x)} (\cos (2 c+d x)-i \sin (2 c+d x))+4 (i \cos (c)+\sin (c)) \tan (c+d x) (4 A-5 i B+2 B \tan (c+d x))\right )}{16 d (A \cos (c+d x)+B \sin (c+d x))} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 4489 vs. \(2 (194 ) = 388\).
time = 63.26, size = 4490, normalized size = 18.40
method | result | size |
default | \(\text {Expression too large to display}\) | \(4490\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 913 vs. \(2 (182) = 364\).
time = 1.53, size = 913, normalized size = 3.74 \begin {gather*} -\frac {16 \, \sqrt {2} \sqrt {-\frac {{\left (-i \, A^{2} - 2 \, A B + i \, B^{2}\right )} a^{3}}{d^{2}}} {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {4 \, {\left ({\left (A - i \, B\right )} a^{2} e^{\left (i \, d x + i \, c\right )} - \sqrt {-\frac {{\left (-i \, A^{2} - 2 \, A B + i \, B^{2}\right )} a^{3}}{d^{2}}} {\left (i \, d e^{\left (2 i \, d x + 2 i \, c\right )} - i \, d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{{\left (-i \, A - B\right )} a}\right ) - 16 \, \sqrt {2} \sqrt {-\frac {{\left (-i \, A^{2} - 2 \, A B + i \, B^{2}\right )} a^{3}}{d^{2}}} {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {4 \, {\left ({\left (A - i \, B\right )} a^{2} e^{\left (i \, d x + i \, c\right )} - \sqrt {-\frac {{\left (-i \, A^{2} - 2 \, A B + i \, B^{2}\right )} a^{3}}{d^{2}}} {\left (-i \, d e^{\left (2 i \, d x + 2 i \, c\right )} + i \, d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{{\left (-i \, A - B\right )} a}\right ) - 4 \, \sqrt {2} {\left ({\left (4 \, A - 7 i \, B\right )} a e^{\left (5 i \, d x + 5 i \, c\right )} + 4 i \, B a e^{\left (3 i \, d x + 3 i \, c\right )} - {\left (4 \, A - 3 i \, B\right )} a e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}} - \sqrt {\frac {{\left (144 i \, A^{2} + 264 \, A B - 121 i \, B^{2}\right )} a^{3}}{d^{2}}} {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (-\frac {16 \, {\left (3 \, {\left (12 i \, A + 11 \, B\right )} a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} + {\left (-12 i \, A - 11 \, B\right )} a^{2} + 2 \, \sqrt {2} \sqrt {\frac {{\left (144 i \, A^{2} + 264 \, A B - 121 i \, B^{2}\right )} a^{3}}{d^{2}}} {\left (d e^{\left (3 i \, d x + 3 i \, c\right )} - d e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{12 i \, A + 11 \, B}\right ) + \sqrt {\frac {{\left (144 i \, A^{2} + 264 \, A B - 121 i \, B^{2}\right )} a^{3}}{d^{2}}} {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (-\frac {16 \, {\left (3 \, {\left (12 i \, A + 11 \, B\right )} a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} + {\left (-12 i \, A - 11 \, B\right )} a^{2} - 2 \, \sqrt {2} \sqrt {\frac {{\left (144 i \, A^{2} + 264 \, A B - 121 i \, B^{2}\right )} a^{3}}{d^{2}}} {\left (d e^{\left (3 i \, d x + 3 i \, c\right )} - d e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{12 i \, A + 11 \, B}\right )}{16 \, {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{\frac {3}{2}} \left (A + B \tan {\left (c + d x \right )}\right )}{\sqrt {\cot {\left (c + d x \right )}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\left (A+B\,\mathrm {tan}\left (c+d\,x\right )\right )\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{3/2}}{\sqrt {\mathrm {cot}\left (c+d\,x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________